import { Meta, StoryObj } from '@storybook/react';
import Watermark, { WatermarkProps } from '.';

const meta = {
  title: '反馈/Watermark 水印',
  component: Watermark,
  parameters: {
    layout: 'centered',
  },
  tags: ['autodocs'],
  argTypes: {},
} satisfies Meta<typeof Watermark>;

export default meta;

type Story = StoryObj<typeof meta>;

const renderWatermark = (args: WatermarkProps) => {
  return (
    <Watermark {...args}>
      <div style={{ height: '400px', width: '600px' }}></div>
    </Watermark>
  );
};

export const Base: Story = {
  name: '基本',
  args: {
    content: ['nebulaUI'],
  },
  render: renderWatermark,
};

export const MultiRow: Story = {
  name: '多行水印',
  args: {
    content: ['nebulaUI', 'hello'],
  },
  render: renderWatermark,
};

export const Picture: Story = {
  name: '图片水印',
  args: {
    width: 200,
    height: 100,
    image:
      'https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*lkAoRbywo0oAAAAAAAAAAAAADrJ8AQ/original',
  },
  render: renderWatermark,
};
